package com.crm.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.crm.entity.UserRoles;
import com.crm.mapper.UserRolesMapper;
import com.crm.service.UserRolesService;

@Service
public class UserRolesServiceImpl implements UserRolesService{

	@Autowired
	private UserRolesMapper userRolesMapper;
	
	@Override
	public int deleteByPrimaryKey(String id) {
		// TODO Auto-generated method stub
		return userRolesMapper.deleteByPrimaryKey(id);
	}

	@Override
	public int insertSelective(UserRoles record) {
		// TODO Auto-generated method stub
		return userRolesMapper.insertSelective(record);
	}

	@Override
	public UserRoles selectByPrimaryKey(String id) {
		// TODO Auto-generated method stub
		return userRolesMapper.selectByPrimaryKey(id);
	}

	@Override
	public List<UserRoles> selectAll() {
		// TODO Auto-generated method stub
		return userRolesMapper.selectAll();
	}

	@Override
	public int updateByPrimaryKeySelective(UserRoles record) {
		// TODO Auto-generated method stub
		return userRolesMapper.updateByPrimaryKeySelective(record);
	}

	@Override
	public int deleteByUidAndRoleid(String userid, String roleid) {
		// TODO Auto-generated method stub
		return userRolesMapper.deleteByUidAndRoleid(userid, roleid);
	}

	@Override
	public int insertByUidAndRoleid(String id, String userid, String roleid) {
		// TODO Auto-generated method stub
		return userRolesMapper.insertByUidAndRoleid(id, userid, roleid);
	}

}
